
//------------------------------------------------------------------------------

using Apps.Models;
using Apps.Models.S;
using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Apps.Models.S
{

	public partial class S_SAMPLE_CHECKModel:Virtual_S_SAMPLE_CHECKModel
	{
        [Display(Name = "申请人")]
        public string CHECK_USER_NAME { get; set; }
         
		public List<S_SAMPLEModel> CHECKDETIAL { get; set; }
		public ICollection<S_SAMPLE_CHECKDETAIL> S_SAMPLE_CHECKDETAIL { get; set; }

        [Display(Name = "抽查样品")]
        public string SAMPLECODES
        {
            get
            {
                if (this.CHECKDETIAL == null)
                {
                    return string.Empty;
                }
                else
                {
                    return string.Join(",", this.CHECKDETIAL.Select(p => p.SAMPLE_CODE).ToArray());
                }
            }
        }
	}
	public class Virtual_S_SAMPLE_CHECKModel
	{
		[Display(Name = "抽查样编号")]
		public virtual string CHECK_ID { get; set; }
		[Display(Name = "抽查类型"),Required]
		public virtual Nullable<int> CHECK_MODE { get; set; }
		[Display(Name = "抽查批次数量"), Required]
		public virtual Nullable<int> CHECK_NUMBER { get; set; }
		[Display(Name = "申请人")]
		public virtual string CHECK_USER_ID { get; set; }
		[Display(Name = "申请时间")]
		public virtual Nullable<System.DateTime> CHECK_TIME { get; set; }
		[Display(Name = "审批状态")]
		public virtual Nullable<int> STATUS { get; set; }
        /// <summary>
        /// 抽查类型（枚举CheckType）
        /// </summary>
		[Display(Name = "抽查类型")]
		public virtual Nullable<long> CHECK_TYPE { get; set; }
		[Display(Name = "原因")]
		public virtual string REMARKS { get; set; }
		[Display(Name = "已取样品数")]
		public virtual Nullable<short> GET_NUMBER { get; set; }
		[Display(Name = "审批流程模板编号")]
		public virtual string TEMPLATE_ID { get; set; }
		[Display(Name = "审批状态（枚举ApprovalStatus）")]
		public virtual Nullable<int> APPROVAL_STATUS { get; set; }
		/// <summary>
		/// 取样类型:0:抽查样,1:弃样取样,2:矿方取样
		/// </summary>
		[Display(Name = "取样类型")]
		public virtual Nullable<int> SAMPLE_TYPE { get; set; }
	}
}
